$(function(){
    // 提取地址栏上的参数
    let goodsId = getParam('id')

     if(!goodsId){
          location.href = 'xiaomi.html'
     }
     console.log($('.section .details>h3'));   
     $.get(baseUrl+'/goods/detail',{goodsId},function(res){
          console.log(res);
          let goods = res.data;

         $('.section .right .details h3').html(goods.goodsName);
         $('.section .main .left img').prop('src',goods.goodsImg[0].goodsThumb);
     },'json')
     // $('.shopping .add').on('click',function(){

     // })
})
